feat: pass forceCloseConnections option from cli#765
feat: pass forceCloseConnections option from cli#765LucaRainone wants to merge 2 commits intofastify:mainfrom
Conversation
README.md
Outdated
There was a problem hiding this comment.
Why did you reformat the whole table? Can you only make the change needed?
There was a problem hiding this comment.
Ops, I believed was some linter. Instead was my IDE. Restored the untouched lines
Eomm
left a comment
There was a problem hiding this comment.
TBH I would set this config to true by default because it may cause data loss in production
- As is: an error logging message
- With default
true: a request that is dropped in the middle of processing
As a user, I would be more pissed of about the 2nd default scenario.
Can't we write in the log:
process forced end. There were 2 open connections. Checkout the `forceCloseConnections` option
I don't get it. If We can write additional infos on message, but this message could also shown in production during restart with "real" chrome connections opened: may be a false hint? |
Enabling the proxy for the forceCloseConnections option. When enabled, this option resolves this issue. Explained in detail also inside this other issue
Please note that the original option on fastify could be both
stringandboolean. In fastify-cli I didn't find a smart way to manage it (it seems that's possible defining only one type in a structural way). I choose to use it as boolean/flag, leaving the only allowed string value (idle) the default option.If there is a better standard solution, please point me in the right direction :)
Checklist
npm run testandnpm run benchmarkand the Code of conduct